#include "Actor.h"
#include <math.h>


Actor::Actor(void)
{
}

Actor::Actor(Sprite *& sprite, GameObject *& gameObject):
gObject( &(gameObject) ), spr( &(sprite) )
{
	//sprPtr = &sprite;

	//gObject = &(gameObject);
	//spr = &(sprite);
}

Actor::~Actor(void)
{
	delete *spr; //?
	*spr = NULL;
}

void Actor::update()
{
	(*spr)->x = (*gObject)->x;
	//(*spr)->x = floor((*gObject)->x);
	(*spr)->y = (*gObject)->y;
	//(*spr)->y = floor((*gObject)->y);
	(*spr)->width = (*gObject)->width;
	(*spr)->height = (*gObject)->height;
	(*spr)->visible = (*gObject)->visible;
	(*spr)->setRotation( (*gObject)->rotation );

	/*spr->x = floor( (*gObject)->x);
	spr->y = floor( (*gObject)->y);
	spr->width = (*gObject)->width;
	spr->height = (*gObject)->height;
	spr->visible = (*gObject)->visible;*/

}
